package com.h;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import android.os.Bundle;
import android.os.Handler;
import android.os.Message;

public class GetDataThread extends Thread {
	
	private Handler handler;
	
	private int pageIdx;//TODO 是否page对象
	
	public GetDataThread(Handler handler,int pageIdx){
		this.handler=handler;
		this.pageIdx=pageIdx;
	}
	
	@Override
	public void run() {
		super.run();
		
		
		
		List<Object> list=new ArrayList<Object>();
		for (int i = pageIdx*10; i < (pageIdx+1)*10; i++) {
			list.add(i);
		}
		
		Bundle data=new Bundle();
		data.putSerializable("data", (Serializable) list);
		Message m=new Message();
		m.setData(data);
		if(pageIdx==2){
			m.what=1;
		}
		handler.sendMessage(m);
	}

}
